package org.agile4j.plugin.gun.command;

import org.agile4j.plugin.gun.helper.GunHelper;
import org.agile4j.plugin.gun.java.GunJava;
import org.agile4j.plugin.gun.xml.GunBaseType;
import org.agile4j.plugin.gun.xml.GunDict;
import org.agile4j.plugin.gun.xml.GunEnumBaseType;
import org.agile4j.plugin.gun.xml.GunFlowTrans;
import org.agile4j.plugin.gun.xml.GunServiceType;
import org.agile4j.plugin.gun.xml.GunTable;
import org.agile4j.plugin.gun.xml.GunType;

public class GunServiceImpl implements Receiver {

	private String path ;
	
	public GunServiceImpl() {
		this.path = GunHelper.getCreateTarXmlFileUrl() ;
	}
	
	public GunServiceImpl(String path) {
		this.path = path;
	}

	@Override
	public void gunBaseType() {
		GunBaseType gunBaseType = new GunBaseType();
		gunBaseType.createTarFile(path);
	}

	@Override
	public void gunBaseEnumType() {
		GunEnumBaseType gunEnumBaseType = new GunEnumBaseType();
		gunEnumBaseType.createTarFile(path);
	}

	@Override
	public void gunDict() {
		GunDict gunDict = new GunDict();
		gunDict.createTarFile(path);
	}

	@Override
	public void gunTable() {
		GunTable gunTable = new GunTable();
		gunTable.createTarFile(path);
	}

	@Override
	public void gunFlowTrans() {
		GunFlowTrans gunFlowTrans = new GunFlowTrans();
		gunFlowTrans.createTarFile(path);
	}

	@Override
	public void gunServiceType() {
		GunServiceType gunServiceType = new GunServiceType();
		gunServiceType.createTarFile(path);
	}

	@Override
	public void gunType() {
		GunType gunType = new GunType();
		gunType.createTarFile(path);
	}

	@Override
	public void gunJava() {
		GunJava gunJava = new GunJava() ;
		gunJava.createTarFile(path) ;
	}
}
